package org.sy.lab.多线程基础._2_同步._1_synchronized._2_使用条件;

public class Consumer implements Runnable {
	
	private Storage storage;
	private int num;
	
	public Consumer(Storage storage, int num) {
		this.storage = storage;
		this.num = num;
	}
	
	@Override
	public void run() {
		storage.subtract(num);
	}
}
